using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace CodeDom
{
  internal class TemplateInterfaceGenerator : TemplateTypeGenerator
  {
    public TemplateInterfaceGenerator(Template template, CodeTypeReference[] baseTypes, TemplateNameGenerator nameGenerator) : base(template, baseTypes, nameGenerator)
    {
    }

    protected override string GenerateTypeName()
    {
      return _nameGenerator.GetInterfaceName(_template);
    }

    public override CodeTypeDeclaration Generate()
    {
      CodeTypeDeclaration typeDeclaration = GenerateTypeDeclaration(TypeAttributes.Interface | TypeAttributes.Public);
      AddProperties(typeDeclaration);

      return typeDeclaration;
    }
  }
}